#!/bin/bash

# Data file
filename=db.txt
# Executable jar
executableJar=target/jwva-0.0.1-jar-with-dependencies.jar

if [[ $# == 0 ]]; then
    mvn clean package
    java -jar ${executableJar} ${filename}
elif [[ $1 == '--skipPackage' ]]; then
    java -jar ${executableJar} ${filename}
else
    echo 'Error! See README.md!'
fi

# Clear environment variables
unset filename
unset executableJar

